1. Field of the Invention
The present invention relates to a technique for detecting the movement of an object through image processing, and to a technical field of a recording apparatus.
2. Description of the Related Art
When performing printing on a medium such as a print sheet while it is being conveyed, a low conveyance precision causes an uneven density of a halftone image or a magnification error, resulting in degraded quality of a printed image. Therefore, although recording apparatuses employ high-precision components and carry an accurate conveyance mechanism, there is a strong demand for higher print quality and higher conveyance precision. At the same time, there is also a strong demand for cost reduction and the achievement of both higher precision and lower cost is demanded.
To meet this demand, an attempt is made to detect the movement of a medium with high precision to achieve stable conveyance through feedback control. A method used in this attempt, also referred to as direct sensing, images the surface of the medium to detect through image processing the movement of the medium being conveyed.
Japanese Patent Application Laid-Open No. 2007-217176 discusses a method of direct sensing. The method in Japanese Patent Application Laid-Open No. 2007-217176 images the surface of a moving medium a plurality of times in a time sequential manner by using an image sensor, and compares acquired images through a pattern matching operation to detect the amount of movement of the medium. Hereinafter, a method for directly detecting the surface of an object to detect its moving state is referred to as direct sensing, and a detector employing this method is referred to as a direct sensor.
To reliably perform determination in the pattern matching operation based on direct sensing, it is important that a template pattern to be set has an appropriate size and position. For example, FIG. 17A illustrates a case where a template pattern 1702 to be set for first image data 1700A primarily acquired has a too large size in the medium conveyance direction. When the entire template pattern 1702 does not fit into second image data 1700B acquired following the first image data 1700A, determination cannot be reliably performed. FIG. 17B illustrates a case where a template pattern 1703 to be set for first image data 1701A has a too small size. In this case, it is highly possible that, in addition to a true matching pattern, the second image data 1700B contains noise pattern similar to the true matching pattern, and the noise pattern is selected.